package com.example.testJava.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 注意：${}是字符替换，不处理sql注入的问题，实际使用中需要格外注意
 * 而#{}是参数替换，不存在sql注入问题
 */
@Service
public interface UserttMapper extends BaseMapper<Usertt> {

    @Select("select * from Usertt where ${where}")
    public List<Usertt> select1(@Param("where") String as_where);

    public default void test1() {
                System.out.printf("hello from world");
    }

    @Override
    default Usertt selectOne(Wrapper<Usertt> queryWrapper) {
        return null;
    }
}
